-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug with proxies #7806
Fix bug with proxies #7806
Conversation
Targetting 13, but can be merged to master too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also add tests for this?
if ($protocol != "https") { | ||
$xForwardedProto = $this->request->getHeader('HTTP_X_FORWARDED_PROTO'); | ||
$xForwardedSSL = $this->request->getHeader('HTTP_X_FORWARDED_SSL'); | ||
if (($xForwardedProto !== null && $xForwardedProto == "https") || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ===
$xForwardedProto = $this->request->getHeader('HTTP_X_FORWARDED_PROTO'); | ||
$xForwardedSSL = $this->request->getHeader('HTTP_X_FORWARDED_SSL'); | ||
if (($xForwardedProto !== null && $xForwardedProto == "https") || | ||
($xForwardedSSL !== null && $xForwardedSSL == "on")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ===
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also why first test if it is null
;)
@rullzer done! |
Tests unlikely, but you can if I ask nicely?:) |
Of course, real testing also appreciated, since I can't test atm. |
Codecov Report
@@ Coverage Diff @@
## stable13 #7806 +/- ##
==============================================
+ Coverage 51.23% 51.23% +<.01%
- Complexity 24970 24973 +3
==============================================
Files 1607 1607
Lines 95008 95014 +6
Branches 1376 1376
==============================================
+ Hits 48675 48680 +5
- Misses 46333 46334 +1
|
Added the tests |
63ca86e
to
9be00f1
Compare
Usually we do the one against master first and then backport to the stable branches. But let's do it the other way around here too. |
Signed-off-by: Mario Danic <mario@lovelyhq.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Fixes issue #7805 (or at least it should).
cc @rullzer @nickvergessen and @MorrisJobke because this breaks things for me :(
Signed-off-by: Mario Danic mario@lovelyhq.com